import { useRoutes, Navigate } from 'react-router-dom';

import LazyLoad from '@/components/LazyLoad';

// import Home from 'sandBox/Home';

const Router = () => {
  const router = useRoutes([
    { path: '/home', element: LazyLoad('sandBox/Home') },
    {
      path: '/user-manage/list',
      element: LazyLoad('sandBox/user-manage/UserList'),
    },
    {
      path: '/right-manage/right/list',
      element: LazyLoad('sandBox/right-manage/RightList'),
    },
    {
      path: '/right-manage/role/list',
      element: LazyLoad('sandBox/right-manage/RoleList'),
    },
    { index: true, element: <Navigate to={'/home'} /> },
    { path: '*', element: LazyLoad('NotFound') },
  ]);
  return router;
};

export default Router;
